<?php echo $this->fetch('pageheader.htm'); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'../js/utils.js,listtable.js,validator.js')); ?>
<script type="text/javascript" src="../js/calendar.php?lang=<?php echo $this->_var['cfg_lang']; ?>"></script>
<link href="../js/calendar/calendar.css" rel="stylesheet" type="text/css" />
<div class="main-div">
<form method="post" action="circle.php" name="theForm" onsubmit="return validate()" enctype="multipart/form-data">
<table cellspacing="1" cellpadding="3" width="100%">
  <tr>
    <td align="right"><?php echo $this->_var['lang']['circle_name']; ?></td>
    <td><input type="text" value="<?php echo $this->_var['circle']['circle_name']; ?>" name="circle_name" size="30" /></td>
  </tr>
  <tr>
    <td align="right"><?php echo $this->_var['lang']['circle_desc']; ?></td>
    <td><textarea name="circle_desc" cols="40" rows="10"><?php echo $this->_var['circle']['circle_desc']; ?></textarea></td>
  </tr>
  <tr>
  	<td align="right"><?php echo $this->_var['lang']['circle_img']; ?></td>
  	<td>
    <input type="file" name="dirPath" size="30" />
    <?php if ($this->_var['circle']['circle_img']): ?>
	 <a href="<?php echo $this->_var['circle']['circle_img']; ?>" target="_blank">
      <img src="<?php echo $this->_var['circle']['circle_img']; ?>" border="0"  style="width:40px;" />
	  </a>
    <?php else: ?>
      <img src="images/no.gif" />
    <?php endif; ?>
	</td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <input type="submit" value="<?php echo $this->_var['lang']['button_submit']; ?>" class="button" />
      <input type="reset" value="<?php echo $this->_var['lang']['button_reset']; ?>" class="button" />
      <input type="hidden" name="act" value="<?php echo $this->_var['form_action']; ?>" />
      <input type="hidden" name="id" value="<?php echo $this->_var['circle']['id']; ?>" />
    </td>
  </tr>
</table>
</form>
</div>
<script language="JavaScript">
<!--

var display_yes = (Browser.isIE) ? 'block' : 'table-row-group';
/**
 * 检查表单输入的数据
 */
function validate()
{
  validator = new Validator("theForm");
  validator.isNullOption("circle_name", no_circle_name);
  return validator.passed();
}



function change_good_products()
{
  var filter = new Object;
  filter.goods_id = document.forms['theForm'].elements['goods_id'].value;

  Ajax.call('yyg.php?is_ajax=1&act=search_products', filter, searchProductsResponse, 'GET', 'JSON');
}

//-->

</script>
<?php echo $this->fetch('pagefooter.htm'); ?>